#ifndef __DEALER_COMBINATIONS_H__
#define __DEALER_COMBINATIONS_H__

#include <vector>
#include <iostream>

class Hand
{
public:
	// in general, if you have any one of the "big four", you are supposed to have
	// all of them.  i'm breaking this rule here in the interest of developer time,
	// but it's likely this will come back to bite us in the future... so write the
	// rest of them when you get a chance ;-)
	// the "big four" are default constructor (here), copy constructor (here), assignment
	// operator, and destructor.
	Hand();
	Hand(const Hand &copyOf);

	void addCard(int value);
	void removeLastCard();

	int total();

	void clear();

	// just for debugging.
	void print(std::ostream &out);

	friend class DealerCombinations;

private:
	std::vector<int> cards;
	
	// tens at index 0, aces at 1, twos at 2, etc
	int composition[10];
	void initializeComposition();
};

class DealerCombinations
{
public:
	// give the shoe *including* the starting cards, as a composition the same way
	// Hand describes it
	DealerCombinations(std::vector<int> &startingCards);
	
	// returns NULL when there are no hands left.
	// the caller owns the returned pointer!
	Hand *next();

private:
	Hand *current;
	int numStarting;
};

#endif